<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>each循环</title>
</head>
<body>
<div style="margin-left: 400px">
    <div th:each="user:${userarray}">
        <p th:text="${user.id}"></p>
        <p th:text="${user.name}"></p>
        <p th:text="${user.sex}"></p>
        <p th:text="${user.age}"></p>
        <br/>
        <hr/>
    </div>
</div>
</body>
</html>